#ifndef TOKENROULETTE_H
#define TOKENROULETTE_H

#include "robot.h"
#include "workspace.h"

#include <QThread>
#include <list>
#include <cstdlib>
#include <iostream>
class Workspace;
class Robot;
class TokenRoulette
{
public:
    TokenRoulette();
    void setWorkspace(Workspace* ws){this->ws=ws;}
    bool isOnWaitingList(Robot* robot);
    void addWaitingRobot(Robot *);
    void removeFromList(Robot* robot);
    bool checkNumberOfRobots();

    Robot* getFirstOnList();
    Robot* getRandomized();
    Robot* getLongestPath();

    void run();
    Workspace *ws;
private:
    std::list<Robot*> waitingRobots;
    //Workspace *ws;
};

#endif // TOKENROULETTE_H
